<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .one {
            width: 200px;
            height: 100px;
            background-color: darkorange;
            text-align: left;
            /* line-height: 100px; */
            
            /* 圆角矩形 */
            border-radius: 20px;

            /* 边框 */
            border: 8px green solid;
            /* 下面一行加上后，边框不再撑大盒子，边框厚度往里面伸展 */
            box-sizing: border-box;

            /* 内边距 */
            padding: 10px 20px 30px 40px;

            /* 外边距 */
            margin: 20px;
        }

        .two {
            width: 200px;
            height: 100px;
            background-color: aqua;

            /* 圆角矩形 */
            border-radius: 20px;

            /* 边框 */
            border: 8px black solid;
            box-sizing: border-box;
            
            /* 内边距 */
            padding: 10px;

            /* 外边距 */
            margin: 20px;



        }

        .three {
            width: 50px;
            height: 50px;
            background-color: red;

            /* 元素居中对齐，水平方向有效，垂直方向无效 */
            margin-left: auto;
            margin-right: auto;
        }
    </style>
</head>
<body>
    <div class="one">这是一个div盒子</div>
    <div class="two">
        <div class="three"></div>
    </div>
</body>
</html>